3.270 \(\int \frac {\sec (x)}{a-a \sin ^2(x)} \, dx\)

Optimal. Leaf size=22 \[ \frac {\tanh ^{-1}(\sin (x))}{2 a}+\frac {\tan (x) \sec (x)}{2 a} \]

[Out]

1/2*arctanh(sin(x))/a+1/2*sec(x)*tan(x)/a

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3175, 3768, 3770} \[ \frac {\tanh ^{-1}(\sin (x))}{2 a}+\frac {\tan (x) \sec (x)}{2 a} \]

Antiderivative was successfully verified.

[In]

Int[Sec[x]/(a - a*Sin[x]^2),x]

[Out]

ArcTanh[Sin[x]]/(2*a) + (Sec[x]*Tan[x])/(2*a)

Rule 3175

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\sec (x)}{a-a \sin ^2(x)} \, dx &=\frac {\int \sec ^3(x) \, dx}{a}\\ &=\frac {\sec (x) \tan (x)}{2 a}+\frac {\int \sec (x) \, dx}{2 a}\\ &=\frac {\tanh ^{-1}(\sin (x))}{2 a}+\frac {\sec (x) \tan (x)}{2 a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.04, size = 45, normalized size = 2.05 \[ \frac {\tan (x) \sec (x)-\log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )+\log \left (\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )\right )}{2 a} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[x]/(a - a*Sin[x]^2),x]

[Out]

(-Log[Cos[x/2] - Sin[x/2]] + Log[Cos[x/2] + Sin[x/2]] + Sec[x]*Tan[x])/(2*a)

________________________________________________________________________________________

fricas [B]  time = 0.45, size = 37, normalized size = 1.68 \[ \frac {\cos \relax (x)^{2} \log \left (\sin \relax (x) + 1\right ) - \cos \relax (x)^{2} \log \left (-\sin \relax (x) + 1\right ) + 2 \, \sin \relax (x)}{4 \, a \cos \relax (x)^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)/(a-a*sin(x)^2),x, algorithm="fricas")

[Out]

1/4*(cos(x)^2*log(sin(x) + 1) - cos(x)^2*log(-sin(x) + 1) + 2*sin(x))/(a*cos(x)^2)

________________________________________________________________________________________

giac [B]  time = 0.13, size = 38, normalized size = 1.73 \[ \frac {\log \left (\sin \relax (x) + 1\right )}{4 \, a} - \frac {\log \left (-\sin \relax (x) + 1\right )}{4 \, a} - \frac {\sin \relax (x)}{2 \, {\left (\sin \relax (x)^{2} - 1\right )} a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)/(a-a*sin(x)^2),x, algorithm="giac")

[Out]

1/4*log(sin(x) + 1)/a - 1/4*log(-sin(x) + 1)/a - 1/2*sin(x)/((sin(x)^2 - 1)*a)

________________________________________________________________________________________

maple [B]  time = 0.21, size = 44, normalized size = 2.00 \[ -\frac {1}{4 a \left (-1+\sin \relax (x )\right )}-\frac {\ln \left (-1+\sin \relax (x )\right )}{4 a}-\frac {1}{4 a \left (1+\sin \relax (x )\right )}+\frac {\ln \left (1+\sin \relax (x )\right )}{4 a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)/(a-a*sin(x)^2),x)

[Out]

-1/4/a/(-1+sin(x))-1/4/a*ln(-1+sin(x))-1/4/a/(1+sin(x))+1/4/a*ln(1+sin(x))

________________________________________________________________________________________

maxima [B]  time = 0.35, size = 37, normalized size = 1.68 \[ \frac {\log \left (\sin \relax (x) + 1\right )}{4 \, a} - \frac {\log \left (\sin \relax (x) - 1\right )}{4 \, a} - \frac {\sin \relax (x)}{2 \, {\left (a \sin \relax (x)^{2} - a\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)/(a-a*sin(x)^2),x, algorithm="maxima")

[Out]

1/4*log(sin(x) + 1)/a - 1/4*log(sin(x) - 1)/a - 1/2*sin(x)/(a*sin(x)^2 - a)

________________________________________________________________________________________

mupad [B]  time = 13.87, size = 25, normalized size = 1.14 \[ \frac {\mathrm {atanh}\left (\sin \relax (x)\right )}{2\,a}+\frac {\sin \relax (x)}{2\,\left (a-a\,{\sin \relax (x)}^2\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(x)*(a - a*sin(x)^2)),x)

[Out]

atanh(sin(x))/(2*a) + sin(x)/(2*(a - a*sin(x)^2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ - \frac {\int \frac {\sec {\relax (x )}}{\sin ^{2}{\relax (x )} - 1}\, dx}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)/(a-a*sin(x)**2),x)

[Out]

-Integral(sec(x)/(sin(x)**2 - 1), x)/a

________________________________________________________________________________________